package top.tagao.kafka.producer.myPartition;

/**
 * @author Viktor.Liu
 * @Date 2023/7/20 18:22
 */import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class Main {
    public static void main(String[] args) {

        for(int i = 0; i <100; i++){
            LocalDateTime now = LocalDateTime.now();

            int randomDays = (int) (Math.random() * 4);
            LocalDateTime futureTime = now.plusDays(randomDays);

            int randomHours = (int) (Math.random() * 25);
            futureTime = futureTime.plusHours(randomHours);

            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
            String futureTimeString = futureTime.format(formatter);

            System.out.println(futureTimeString);
        }

    }
}